Repository navigation
canvas: scope erwin export to a single selected subject area - #63
Merged
Merged
Conversation
Scoped erwin export (export erwin --subject-area) was CLI/API only. Now the canvas Export menu wires it to the left-bar subject-area filter: when EXACTLY one area is selected, the erwin option scopes to it (href gains ?subject_area=<id>) and shows a '· filtered area only' note; zero or several selected -> whole model. Every other format always exports the whole model. Threads activeAreas (App) -> TopBar -> ImportExportMenu; exportUrl gains an optional subjectArea param. Verified live: filter to one area -> erwin link is /api/export/erwin?subject_area=<id>, the download is a valid, smaller scoped slice; unfiltered -> whole model. tsc clean, Vitest 55 passed.
dbose
added a commit
that referenced
this pull request
Nov 2, 2026
0.8.2 -> 0.8.3. Wires the scoped erwin export into the canvas Export menu (PR #63): with exactly one subject area filtered in the left drawer, Export -> erwin XML downloads just that area's slice (/api/export/erwin?subject_area=<id>); zero or multiple areas selected export the whole model. Only erwin honours the filter. The backend scoped export (0.8.2) was CLI/API-only; this makes it reachable from the UI.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Wires the scoped erwin export (shipped in 0.8.2 for CLI/API) into the canvas Export menu, so the workflow works end to end from the UI.
When exactly one subject area is filtered in the left drawer, the Export → erwin XML item scopes the download to that area (and shows a
· filtered area onlynote). Zero or multiple areas selected → whole model, as before. Only erwin honours the filter; every other export format is always whole-model.Why
The backend scoped export (import a mart → iterate one subject area → export just that slice → re-import into the mart's SA by GUID, no duplicates) landed CLI/API-only. Without the canvas wiring a user filtering to one area and clicking Export → erwin still got the whole model — the feature wasn't reachable where people actually work.
How
exportUrl(fmt, dialect?, subjectArea?)gains an optionalsubject_areaquery param (built withURLSearchParams).activeAreasthreads App →TopBar→ImportExportMenuasscopeSubjectArea(the single active area's id, ornull).ImportExportMenuapplies the scope to the erwin item only; the note renders when scoped.Verification
tscclean; Vitest 55 passed./api/export/erwin?subject_area=<id>→ HTTP 200, XSD-valid, carried theSubject_Area, and was smaller than the full export (4877 vs 5209 bytes). Other formats' links unchanged.Note for the release picture
This is a new change on top of 0.8.2 (which has the backend scoped export). To ship canvas scoping to users it needs the next bump (0.8.3) or to be folded into 0.8.2 before publishing.